package homewoek12月12号.homework2.h2;

import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;

import java.util.List;

public class demo1 {
    public static void main(String[] args) throws DocumentException {
        SAXReader saxReader = new SAXReader();
        Document read = saxReader.read("D:\\ldea dashuju\\day.12.11\\src\\czxy\\homework\\h2\\h2.xml");
        Element root = read.getRootElement();
        List <Element>rlist = root.elements("VALUE");
        for (Element element : rlist) {
            System.out.println(element.getName());
            System.out.println(element.elementText("NO")+"=="+element.element("NO").attributeValue("DATE"));
            System.out.println(element.elementText("ADDR"));
        }
    }
}
